<template>
  <a-layout id="components-layout-demo-side" style="min-height: 100vh">

    <a-layout-sider collapsible v-model="collapsed">
      <div class="logo" />
      <a-menu theme="dark" :defaultOpenKeys="['sub1']" :defaultSelectedKeys="['1']" mode="inline">
        <a-sub-menu key="sub1">
          <span slot="title"><a-icon type="user" /><span>人员管理</span></span>
          <a-menu-item key="1">人员列表</a-menu-item>
        </a-sub-menu>
      </a-menu>
    </a-layout-sider>
    <a-layout>
      <a-layout-header style="background: #fff; padding: 0" >
        <a-breadcrumb style="margin: 16px 0">
          <a-breadcrumb-item>人员管理</a-breadcrumb-item>
          <a-breadcrumb-item>{{this.$store.state.title}}</a-breadcrumb-item>
        </a-breadcrumb>
      </a-layout-header>
      <a-layout-content style="margin: 16px 16px">
        <div :style="{ padding: '24px', background: '#fff', minHeight: '360px' }">
          <list v-if="this.$route.name == 'list'"></list>
          <examine v-if="this.$route.name == 'examine'"></examine>
          <edit v-if="this.$route.name == 'edit'"></edit>
        </div>
      </a-layout-content>
      <a-layout-footer style="text-align: center">
        Ant Design ©2020 Created by Ant UED
      </a-layout-footer>
    </a-layout>
  </a-layout>
</template>
<script>
  import list from './list'
  import edit from './edit'
  import examine from './examine'
  export default {
    name: 'admin',
    components:{
      list,
      edit,
      examine
    },
    data() {
      return {
        collapsed: false,
      };
    },
    created() {
    },
    methods: {
    }

  };
</script>

<style>
  #components-layout-demo-side .logo {
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    margin: 16px;
  }
</style>
